<template>
  <div id="app">
    <header class="nav">
      <img src="@/assets/logo.png" alt="">
      <el-menu text-color='#1B1F2A' active-text-color="#92282A" :default-active="$router.currentRoute.path" router mode="horizontal">
        <el-menu-item index="/">首页</el-menu-item>
        <el-menu-item index="/company">公司概况</el-menu-item>
        <el-menu-item index="/news">行业资讯</el-menu-item>
        <el-menu-item index="/video">视频中心</el-menu-item>
        <el-menu-item index="/project">公司项目</el-menu-item>
        <el-menu-item index="/about">联系我们</el-menu-item>
      </el-menu>
    </header>
    <div class="content">
      <router-view />
    </div>
    <footer>
      <div class="commonWrapper">
        <div>
          <p>
            <img src="@/assets/icon/f1.png" alt=""> <span>{{footerInfo.work_time}}</span>
          </p>
          <p>
            <img src="@/assets/icon/f3.png" alt=""> <span>{{footerInfo.site_mail}}</span>
          </p>
          <p>
            <img src="@/assets/icon/f4.png" alt=""> <span>{{footerInfo.site_phone}}</span>
          </p>
          <p>
            <img src="@/assets/icon/f2.png" alt=""> <span>{{footerInfo.site_address}}</span>
          </p>
        </div>
        <div>
          <img :src="$api.picPre + footerInfo.site_logo" alt="">
        </div>
      </div>
      <div class="icp">
        Copyright 2020 北京畅想新影影业有限公司&nbsp;京ICP备 {{footerInfo.site_record_no}}
      </div>
    </footer>
  </div>
</template>

<script>
export default {
  name: 'app',
  components: {
  },
  data () {
    return {
      footerInfo: {}
    }
  },
  methods: {
    getFooter () {
      this.$ajax
        .get(this.$api.getConfigInfo)
        .then(res => {
          this.footerInfo = res
          console.log(this.footerInfo)
        })
        .catch(err => {
          this.$message({
            message: err,
            type: 'warning'
          })
        })
    }
  },
  created () {
    this.getFooter()
  }
}
</script>

<style lang="scss">
  body {
    padding: 0;
    margin: 0;
    min-width: 1250px;
  }

  #app {
    font-family: 'Avenir', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #2c3e50;
  }

  .nav {
    width: 1200px;
    margin: 0 auto;
    line-height: 100px;
    height: 100px;
    @include flex_content;
    @include flex_justify_space;
    @include flex_align_center;
    > img {
      height: 84px;
    }
  }
  .content{
    min-height: 400px;
  }
  footer{
    background:rgba(27,31,42,1);
    .commonWrapper{
      padding: 31px 0 !important;
      @include flex_content;
      @include flex_justify_space;
      @include flex_align_center;
      p{
        line-height: 47px;
        img{
          vertical-align: middle;
          margin-right: 22px;
        }
        span{
          font-size:12px;
          font-family:Microsoft YaHei;
          font-weight:400;
          color:rgba(255,255,255,1);
          line-height:27px;
        }
      }
    }
    .icp{
      text-align: center;
      font-size:12px;
      font-family:Microsoft YaHei;
      font-weight:400;
      color:rgba(255,255,255,1);
      height: 72px;
      line-height: 72px;
      border-top: 1px solid rgba(255,255,255,1);
    }
  }
</style>
